<template>
<div>
  用户名: <input type="text" v-model="form.name">
  密码: <input type="text" v-model="form.word">
  <button @click="deng">登录</button>
</div>
</template>

<script>
export default {
  name: "ce_4",
  data(){
    return{
      form:{}
    }
  },
  methods:{
    deng(){
      this.axios.post('user/Deng/',this.form)
      .then(res=>{
        localStorage.setItem('userid',res.data.userid)
        alert('登录成功')
        this.$router.push('/ce_2')
      })
    }
  }
}
</script>

<style scoped>

</style>
